<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AddFileds2IntoProducts extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('products', function (Blueprint $table) {
            $table->json('labels')->nullable();
            $table->tinyInteger('hairstyle')->default(0);
            $table->tinyInteger('scheduling')->default(0);
            $table->tinyInteger('is_secretly')->nullable()->default(0);
            $table->tinyInteger('is_specific_service')->nullable()->default(0);

            $table->json('gift_specific_service')->nullable();
            $table->string('custom_service')->nullable();
            $table->json('gift_not_specific_service')->nullable();
            $table->string('custom_service2')->nullable();
            $table->json('prohibited_guests')->nullable();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('products', function (Blueprint $table) {
            $table->dropColumn([
                'labels','hairstyle','scheduling','is_secretly','is_specific_service','gift_specific_service','custom_service','gift_not_specific_service','custom_service2','prohibited_guests'
            ]);
        });
    }
}
